<?php

session_start();
include('../../include/dbFunctions.php');
if(isset($_SESSION['school_id'])){
    $school_id=$_SESSION['school_id'];
}
$table = "contact_school";
$id = $_GET['id'];//id sent by plugin DataTables Editable

$query = "DELETE FROM $table WHERE contact_school_id = $id";
$result = executeQuery($query);
        if ($result!=0) {
            $_SESSION['mes'] = "Your record has been deleted successfully";
        } else {
            $_SESSION['mes'] = "Error! Please try again";
        }
        $link = "../schoolView.php?id=$school_id";
        header("Location: $link ");


?>
